# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Lauri Niskanen <ape@ape3000.com>
# Contributor: Ray Rashif <schivmeister@gmail.com>

pkgname=celt
pkgver=0.11.3
pkgrel=4
pkgdesc="Low-latency audio communication codec"
url="https://gitlab.xiph.org/xiph/celt"
arch=(x86_64)
license=(BSD)
depends=(libogg)
makedepends=(git)
provides=(libcelt0.so)
_commit=6c28805c56d562bec56cc0b31c0d5905ebb5a6ac  # tags/v0.11.3
source=("git+$url.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd celt
  git describe --tags | sed 's/^v//;s/-/+/g'
}

prepare() {
  cd celt
  ./autogen.sh
}

build() {
  cd celt
  ./configure --prefix=/usr --enable-custom-modes --disable-static
  make
}

package() {
  cd celt
  make DESTDIR="$pkgdir" install
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING
}

# vim:set sw=2 et:
